﻿<%@ Page Title="Manage Users :: Re-SeSS" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="ManageUsers.aspx.cs" Inherits="ReSeSSApplication.ManageUsers" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"></asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="bodyContent" runat="server">


    <div class="navbar"><div class="navbar-inner">
    <div class="container">
        
        <a class="brand" href="./Index.aspx">Re-SeSS</a>
        
        <ul class="nav">
            <li><a href="AdministratorDashboard.aspx">Dashboard</a></li>
            <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Administrator <b class="caret"></b></a>
                <ul class="dropdown-menu">
                    <li><a href="RegisterUser.aspx">Register User</a></li>
                    <li><a href="ManageUsers.aspx">Manage Users</a></li>
                </ul>
            </li>
        </ul>
        
        <ul class="nav pull-right">
            <li class="dropdown">
                <a data-toggle="dropdown" class="dropdown-toggle" href="#"><%=loggedInUserDTO.FirstName%>&nbsp;<%=loggedInUserDTO.LastName%> <b class="caret"></b></a>
                <ul class="dropdown-menu">
                    <li><a href="Profile.aspx">Profile</a></li>
                    <li><a href="ChangePassword.aspx">Change Password</a></li>
                    <li class="divider"></li>
                    <li><a href="LogOut.aspx">Logout</a></li></li>
                </ul>
            </li>
        </ul>
        
    </div>
    </div></div><!--navbar ends-->
    
    
    <ul class="breadcrumb">
    	<li class="active">You are in:&nbsp;&nbsp;&nbsp;</li>
    	<li><a href="AdministratorDashboard.aspx">Dashboard</a> <span class="divider">/</span></li>
        <li class="active">Manage Users</li>
    </ul><!--breadcrumb ends-->


    <div class="well" id="user-management">

        <div class="alert alert-error" id="AlertError" runat="server"></div>
        <div class="alert alert-success" id="AlertSuccess" runat="server"></div>
    	<div class="alert alert-info" id="AlertInfo" runat="server"></div>

        <asp:GridView ID="UserGridView" runat="server" AutoGenerateColumns="False" 
            GridLines="None" CellSpacing="-1" 
            CssClass="table table-bordered table-striped" 
            onrowdatabound="UserGridView_RowDataBound" 
            onrowcreated="UserGridView_RowCreated" 
            onrowdeleting="UserGridView_RowDeleting" 
            onrowcommand="UserGridView_RowCommand">
            <Columns>
                <asp:BoundField DataField="LoginId" HeaderText="Login Id" />
                <asp:TemplateField HeaderText="Name">
                    <ItemTemplate>
                        <asp:Label ID="lblFirstName" runat="server" Text='<%# Bind("FirstName") %>'></asp:Label> 
                        <asp:Label ID="lblLastName" runat="server" Text='<%# Bind("LastName") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Email" HeaderText="Email Address" />
                <asp:BoundField DataField="UserType" HeaderText="User Type" />
                <asp:BoundField DataField="IsActive" HeaderText="Is Active?" >
                    <HeaderStyle CssClass="center" />
                    <ItemStyle CssClass="center" />
                </asp:BoundField>
                <asp:TemplateField ShowHeader="False">
                    <ItemTemplate>
                        <asp:HiddenField ID="UserId" Value='<%# Bind("Id") %>' runat="server" />
                        <asp:LinkButton ID="UserEditButton" runat="server" CausesValidation="false" 
                            CommandName="Edit" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" Text="<i class='icon-edit'></i>" ToolTip="Edit User"></asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle CssClass="center" />
                </asp:TemplateField>
                <asp:TemplateField ShowHeader="False">
                    <ItemTemplate>
                        <asp:LinkButton ID="UserDeleteButton" runat="server" CausesValidation="False" 
                            CommandName="Delete" Text="<i class='icon-trash'></i>" ToolTip="Delete User" CssClass="user-delete"></asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle CssClass="center" />
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        
        
    </div><!--body ends-->


</asp:Content>
